$(function () {
    new Swiper('.top_search .swiper-container', {
        direction: 'vertical',
        autoplay: {
            delay: 2000
        },
        loop: true
    });


    var _dom = $(".returnTop");
    var _height = $(window).height();

    // 监听页面滚动隐藏按钮
    $(window).scroll(function () {
        if ($(window).scrollTop() > _height) {
            _dom.fadeIn();
        } else {
            _dom.fadeOut();
        }
    });

    // 返回顶部
    _dom.click(function () {
        $('body,html').animate({scrollTop: 0}, 400);
    });

    $('.top_search .center a').on('click', function () {
        var ym = $(this).siblings('input').val();
        if (ym == '') {
            layer.msg('请输入您要注册的域名或者品牌名')
            return false;
        }
        window.open('http://7a08c112cda6a063.juming.com:9696/reg/c?ym=' + ym)
    })

});